/*
 * @Description: 
 * @Author: paddies
 * @Date: 2024-06-01 13:10:19
 * @LastEditors: paddies
 * @LastEditTime: 2025-09-13 10:16:00
 * @FilePath: /shared_components/lib/luntai-components/login-panel/loginPanel.dart
 */
library shared_components;

import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:get/get.dart';
import 'package:shared_components/build-button/buildButton.dart';
import 'package:shared_components/build-common/buildCommon.dart';
import 'package:shared_components/build-image/buildImage.dart';
import 'package:shared_components/build-upload/buildUpload.dart';
import 'package:shared_components/init.dart';
import 'package:shared_components/luntai-components/login-panel/controller.dart';

// typedef OnButtonPress = void Function(); // 定义一个函数类型别名

class LoginPanel extends StatefulWidget {
  final String requestBaseUrl;
  final String appType;
  final Function({String userAccount, String password}) loginAPI;

  final Function loginSuccess;
  final Function? findPasswordSuccess;
  final Function({String code, String password, String userAccount})
      findPasswordAPI;
  final Function({String mobile}) sendFindCodeAPI;
  final Function registerAPI;
  final Function({String mobile}) sendRegisterCodeAPI;
  const LoginPanel(
      {super.key,
      required this.appType,
      required this.requestBaseUrl,
      required this.loginSuccess,
      this.findPasswordSuccess,
      required this.sendFindCodeAPI,
      required this.registerAPI,
      required this.sendRegisterCodeAPI,
      required this.findPasswordAPI,
      required this.loginAPI});

  @override
  State<LoginPanel> createState() => _LoginPanelState();
}

class _LoginPanelState extends State<LoginPanel> {
  final LoginPanelPageController controller =
      Get.put(LoginPanelPageController());

  @override
  void initState() {
    super.initState();
  }

  getTabClass(bool isActive) {
    if (isActive) {
      return BoxDecoration(
        borderRadius: const BorderRadius.all(Radius.circular(40.0)), //圆角
        color: Colors.white,
        boxShadow: [
          BoxShadow(
            color: Colors.grey.withOpacity(0.2), // 阴影颜色
            spreadRadius: 5, // 阴影扩散的半径
            blurRadius: 10, // 阴影模糊的半径
            offset: const Offset(2, 3), // 阴影的偏移量
          ),
        ],
      );
    }

    return const BoxDecoration(
      color: Colors.transparent,
    );
  }

  //顶部选项 tab
  Widget buildTopTab() {
    return Container(
        width: double.infinity,
        height: 90,
        color: Colors.transparent,
        child: Padding(
          padding:
              const EdgeInsets.only(left: 20, right: 20, top: 20, bottom: 15),
          child: Container(
            width: double.infinity,
            height: double.infinity,
            decoration: const BoxDecoration(
                borderRadius: BorderRadius.all(Radius.circular(40.0)), //圆角
                color: Color(0xffF0F4F7)),
            child: Row(
              children: [
                ...controller.state.tabList.asMap().keys.map((i) {
                  return Expanded(
                      child: Container(
                    width: double.infinity,
                    height: double.infinity,
                    child: Padding(
                      padding: const EdgeInsets.only(
                          top: 5, bottom: 5, left: 10, right: 10),
                      child: GestureDetector(
                          onTap: () {
                            controller.changeTab(i);
                          },
                          child: Container(
                            width: double.infinity,
                            height: double.infinity,
                            alignment: Alignment.center,
                            decoration: getTabClass(
                                controller.state.activeTab.value == i),
                            child: Text(
                              controller.getTabName(i),
                              style: TextStyle(
                                  fontWeight:
                                      controller.state.activeTab.value == i
                                          ? FontWeight.bold
                                          : FontWeight.w500),
                            ),
                          )),
                    ),
                  ));
                }).toList(),

                // Expanded(
                //     child: Container(
                //   width: double.infinity,
                //   height: double.infinity,
                //   child: const Text("忘记密码"),
                // ))
              ],
            ),
          ),
        ));
  }

  //密码登录视图
  Widget buildPasswordPanel() {
    return Expanded(
        child: Padding(
            padding: const EdgeInsets.only(left: 20, right: 20),
            child: SizedBox(
              width: double.infinity,
              height: double.infinity,
              child: SingleChildScrollView(
                child: Column(
                  children: [
                    Container(
                      width: double.infinity,
                      height: 50,
                      margin: const EdgeInsets.only(top: 15, bottom: 5),
                      decoration: const BoxDecoration(
                        color: Color(0xffF9FAFE),
                        borderRadius:
                            BorderRadius.all(Radius.circular(40.0)), //圆角
                      ),
                      child: CupertinoTextFormFieldRow(
                        style: const TextStyle(fontSize: 15),
                        controller: controller.loginPhoneInputController,
                        inputFormatters: [
                          FilteringTextInputFormatter.digitsOnly,
                          LengthLimitingTextInputFormatter(11), //限制长度
                        ],
                        placeholder: '手机号',
                        placeholderStyle: TextStyle(
                            color: CupertinoColors.darkBackgroundGray
                                .withOpacity(.7)),
                        keyboardType: TextInputType.emailAddress,
                        keyboardAppearance: Brightness.dark,
                        onChanged: (value) => {
                          controller.state.loginPhone.value = value.toString()
                        },
                      ),
                    ),
                    Container(
                      width: double.infinity,
                      height: 50,
                      margin: const EdgeInsets.only(top: 15, bottom: 5),
                      decoration: const BoxDecoration(
                        color: Color(0xffF9FAFE),
                        borderRadius:
                            BorderRadius.all(Radius.circular(40.0)), //圆角
                      ),
                      child: CupertinoTextFormFieldRow(
                        style: const TextStyle(fontSize: 15),
                        obscureText: true,
                        placeholder: '密码',
                        placeholderStyle: TextStyle(
                            color: CupertinoColors.darkBackgroundGray
                                .withOpacity(.7)),
                        keyboardType: TextInputType.emailAddress,
                        keyboardAppearance: Brightness.dark,
                        onChanged: (value) => {
                          controller.state.loginPassword.value =
                              value.toString()
                        },
                      ),
                    ),
                    Padding(
                        padding: const EdgeInsets.only(top: 45, bottom: 10),
                        child: buildButton(
                            title: "登录",
                            height: 50,
                            onClick: () {
                              controller.handleLogin(

                                  // submitFn: () {
                                  //   widget.loginFn();
                                  // },
                                  loginAPI: widget.loginAPI,
                                  loginSuccess: widget.loginSuccess);
                            },
                            colors: [
                              const Color(0xff0000FF),
                              const Color(0xff0000FF)
                            ])),
                    Container(
                      width: double.infinity,
                      height: 30,
                      margin: const EdgeInsets.only(top: 30),
                      child: Row(
                        children: [
                          Expanded(
                              child: SizedBox(
                                  width: double.infinity,
                                  height: double.infinity,
                                  child: Column(
                                    mainAxisAlignment: MainAxisAlignment.center,
                                    children: [
                                      Container(
                                        width: double.infinity,
                                        height: 1,
                                        color: const Color.fromARGB(
                                            60, 153, 153, 153),
                                      ),
                                    ],
                                  ))),
                          const Padding(
                            padding: EdgeInsets.only(left: 20, right: 20),
                            child: Text(
                              "or",
                              style: TextStyle(color: Color(0xff999999)),
                            ),
                          ),
                          Expanded(
                              child: SizedBox(
                            width: double.infinity,
                            height: double.infinity,
                            // color: Colors.yellow,
                            child: Column(
                              mainAxisAlignment: MainAxisAlignment.center,
                              children: [
                                Container(
                                  width: double.infinity,
                                  height: 1,
                                  color:
                                      const Color.fromARGB(60, 153, 153, 153),
                                ),
                              ],
                            ),
                          ))
                        ],
                      ),
                    ),
                    Padding(
                        padding: const EdgeInsets.only(top: 20, bottom: 20),
                        child: SizedBox(
                          width: double.infinity,
                          height: 40,
                          // color: Colors.red,
                          child: Row(
                            children: [
                              Expanded(
                                  child: Container(
                                width: double.infinity,
                                height: double.infinity,
                                // color: Colors.yellow,
                                padding: const EdgeInsets.only(right: 30),
                                alignment: Alignment.centerRight,
                                child: GestureDetector(
                                    onTap: () {
                                      // controller.otherLogion('weixin');
                                    },
                                    child: buildImage(
                                        url: "assets/images/login/weixin.png",
                                        width: 40,
                                        height: 40,
                                        fit: BoxFit.fitHeight)),
                              )),
                              Expanded(
                                  child: Container(
                                width: double.infinity,
                                height: double.infinity,
                                // color: Colors.green,
                                alignment: Alignment.centerLeft,
                                padding: const EdgeInsets.only(left: 30),
                                child: GestureDetector(
                                    onTap: () {
                                      // controller.otherLogion('qq');
                                    },
                                    child: buildImage(
                                        width: 40,
                                        height: 40,
                                        fit: BoxFit.fitHeight,
                                        url: "assets/images/login/qq.png")),
                              ))
                            ],
                          ),
                        )),
                    buildRadio()
                  ],
                ),
              ),
            )));
  }

  // 选用户同意书视图
  Widget buildRadio() {
    return Row(
      children: [
        Obx(() => Checkbox(
              value: controller.state.isRead.value,
              onChanged: (v) {
                controller.changeRead();
              },
              activeColor: Colors.black,
            )),
        Expanded(
          flex: 1,
          child: Wrap(
            direction: Axis.horizontal,
            children: [
              const Text("已阅读并同意："),
              // GestureDetector(
              //   onTap: () => {Get.toNamed("/webview")},
              //   child: Text(
              //     "《中国移动号码服务条款》",
              //     style: TextStyle(color: ThemeColor.link),
              //   ),
              // ),
              // GestureDetector(
              //   onTap: () {},
              //   child: Text(
              //     "《电子渠道服务协议》",
              //     style: TextStyle(color: ThemeColor.link),
              //   ),
              // ),
              GestureDetector(
                onTap: () {
                  Get.toNamed("/webview", arguments: {
                    "title": "《隐私政策》",
                    "url": "${widget.requestBaseUrl}/download/private.html"
                  });
                },
                child: Text(
                  "《隐私政策》",
                  style: TextStyle(color: Color(0xff00C1EC)),
                ),
              ),
              GestureDetector(
                onTap: () {
                  Get.toNamed("/webview", arguments: {
                    "title": "《用户协议》",
                    "url": "${widget.requestBaseUrl}/download/service.html"
                  });
                },
                child: Text(
                  "《用户协议》",
                  style: TextStyle(color: Color(0xff00C1EC)),
                ),
              ),
            ],
          ),
        )
      ],
    );
  }

  //忘记密码视图
  Widget buildFindPasswordPanel() {
    return Expanded(
        child: Padding(
      padding: const EdgeInsets.only(left: 20, right: 20),
      child: SizedBox(
          width: double.infinity,
          height: double.infinity,
          child: SingleChildScrollView(
            child: Column(
              children: [
                Container(
                  width: double.infinity,
                  height: 50,
                  margin: const EdgeInsets.only(top: 15, bottom: 5),
                  decoration: const BoxDecoration(
                    color: Color(0xffF9FAFE),
                    borderRadius: BorderRadius.all(Radius.circular(40.0)), //圆角
                  ),
                  child: CupertinoTextFormFieldRow(
                    style: const TextStyle(fontSize: 15),
                    inputFormatters: [
                      FilteringTextInputFormatter.digitsOnly,
                      LengthLimitingTextInputFormatter(11), //限制长度
                    ],
                    placeholder: '手机号',
                    placeholderStyle: TextStyle(
                        color:
                            CupertinoColors.darkBackgroundGray.withOpacity(.7)),
                    keyboardType: TextInputType.emailAddress,
                    keyboardAppearance: Brightness.dark,
                    onChanged: (value) =>
                        {controller.state.findPhone.value = value.toString()},
                  ),
                ),
                Container(
                  width: double.infinity,
                  height: 50,
                  margin: const EdgeInsets.only(top: 15, bottom: 5),
                  decoration: const BoxDecoration(
                    color: Color(0xffF9FAFE),
                    borderRadius: BorderRadius.all(Radius.circular(40.0)), //圆角
                  ),
                  child: Stack(
                    alignment: Alignment.topRight,
                    children: [
                      CupertinoTextFormFieldRow(
                        style: const TextStyle(fontSize: 15),
                        inputFormatters: [
                          FilteringTextInputFormatter.digitsOnly,
                          LengthLimitingTextInputFormatter(6), //限制长度
                        ],
                        placeholder: '验证码',
                        placeholderStyle: TextStyle(
                            color: CupertinoColors.darkBackgroundGray
                                .withOpacity(.7)),
                        keyboardType: TextInputType.emailAddress,
                        keyboardAppearance: Brightness.dark,
                        onChanged: (value) => {
                          controller.state.findCode.value = value.toString()
                        },
                      ),
                      Container(
                        padding: const EdgeInsets.only(right: 30),
                        child: OutlinedButton(
                            onPressed: () => {
                                  controller.getFindCode(
                                      sendFindCodeAPI: widget.sendFindCodeAPI)
                                },
                            style: ButtonStyle(
                              side: MaterialStateProperty.all(const BorderSide(
                                  width: 0.0, color: Colors.transparent)),
                              shape: MaterialStateProperty.all(
                                  RoundedRectangleBorder(
                                      borderRadius: BorderRadius.circular(20))),
                              textStyle: MaterialStateProperty.all(
                                  const TextStyle(fontSize: 16)),
                            ),
                            child: Obx(() => Text(
                                  controller.state.findWaitTitle.value,
                                  style: TextStyle(
                                    color: Color(0xff0000f5),
                                  ),
                                ))),
                      )
                    ],
                  ),
                ),
                Container(
                  width: double.infinity,
                  height: 50,
                  margin: const EdgeInsets.only(top: 15, bottom: 5),
                  decoration: const BoxDecoration(
                    color: Color(0xffF9FAFE),
                    borderRadius: BorderRadius.all(Radius.circular(40.0)), //圆角
                  ),
                  child: CupertinoTextFormFieldRow(
                    style: const TextStyle(fontSize: 15),
                    obscureText: true,
                    placeholder: '*新密码',
                    placeholderStyle: TextStyle(
                        color:
                            CupertinoColors.darkBackgroundGray.withOpacity(.7)),
                    keyboardType: TextInputType.emailAddress,
                    keyboardAppearance: Brightness.dark,
                    onChanged: (value) => {
                      controller.state.findNewPassword.value = value.toString()
                    },
                  ),
                ),
                Container(
                  width: double.infinity,
                  height: 50,
                  margin: const EdgeInsets.only(top: 15, bottom: 5),
                  decoration: const BoxDecoration(
                    color: Color(0xffF9FAFE),
                    borderRadius: BorderRadius.all(Radius.circular(40.0)), //圆角
                  ),
                  child: CupertinoTextFormFieldRow(
                    style: const TextStyle(fontSize: 15),
                    obscureText: true,
                    placeholder: '*确认新密码',
                    placeholderStyle: TextStyle(
                        color:
                            CupertinoColors.darkBackgroundGray.withOpacity(.7)),
                    keyboardType: TextInputType.emailAddress,
                    keyboardAppearance: Brightness.dark,
                    onChanged: (value) => {
                      controller.state.findAgainNewPassword.value =
                          value.toString()
                    },
                  ),
                ),
                Padding(
                    padding: const EdgeInsets.only(top: 45, bottom: 10),
                    child: buildButton(
                        title: "确定",
                        height: 50,
                        onClick: () {
                          controller.handleFindPassword(
                              loginAPI: widget.loginAPI,
                              loginSuccess: widget.loginSuccess,
                              findPasswordAPI: widget.findPasswordAPI);
                        },
                        colors: [
                          const Color(0xff0000FF),
                          const Color(0xff0000FF)
                        ])),
              ],
            ),
          )),
    ));
  }

  // 注册面板视图
  Widget buildRegisterPanel() {
    if (widget.appType == "user") {
      return userRegisterPanel();
    }
    if (widget.appType == 'business') {
      return businessRegisterPanel();
    }

    if (widget.appType == 'worker') {
      return workerRegisterPanel();
    }

    if (widget.appType == 'supplier') {
      return supplierRegisterPanel();
    }

    return Container();
  }

  Widget supplierRegisterPanel() {
    return Expanded(
        child: Padding(
            padding: const EdgeInsets.only(left: 20, right: 20),
            child: Container(
                width: double.infinity,
                height: double.infinity,
                // color: Colors.green,
                child: SingleChildScrollView(
                    child: Column(children: [
                  //营业执照照片/开户许可证/一般纳税人
                  Container(
                    width: double.infinity,
                    height: 40,
                    alignment: Alignment.centerLeft,
                    padding: const EdgeInsets.only(left: 20),
                    child: const Text("营业执照照片/开户许可证/一般纳税人"),
                  ),
                  buildUpload(
                      list: controller.state.registerBusinessImages,
                      rowCount: 3,
                      max: 3,
                      imageType: "BusinessLicense",
                      onOcrContent: (orcData) {
                        controller.handleOrcData(
                            imageType: "BusinessLicense", orcData: orcData);
                      },
                      onChange: (type, value, index) {
                        if (type == 'add') {
                          print("添加返回");
                          controller.state.registerBusinessImages.add(value);
                        }
                        if (type == 'del') {
                          controller.state.registerBusinessImages
                              .removeAt(index);
                        }
                        if (type == 'change') {
                          controller.state.registerBusinessImages[index] =
                              value;
                        }
                      }),
                  // // 营业执照-正面
                  // Container(
                  //   width: double.infinity,
                  //   height: 40,
                  //   alignment: Alignment.centerLeft,
                  //   padding: EdgeInsets.only(left: 20),
                  //   child: Text("营业执照正面"),
                  // ),
                  // buildUpload(
                  //     list:
                  //         controller.state.registerBusinessCertificateFrontUrl,
                  //     rowCount: 2,
                  //     max: 1,
                  //     onChange: (type, value, index) {
                  //       if (type == 'add') {
                  //         print("添加返回");
                  //         controller.state.registerBusinessCertificateFrontUrl
                  //             .add(value);
                  //       }
                  //       if (type == 'del') {
                  //         controller.state.registerBusinessCertificateFrontUrl
                  //             .removeAt(index);
                  //       }
                  //       if (type == 'change') {
                  //         controller.state
                  //                 .registerBusinessCertificateFrontUrl[index] =
                  //             value;
                  //       }
                  //     }),
                  // // 营业执照-反面
                  // Container(
                  //   width: double.infinity,
                  //   height: 40,
                  //   alignment: Alignment.centerLeft,
                  //   padding: EdgeInsets.only(left: 20),
                  //   child: Text("营业执照反面"),
                  // ),
                  // buildUpload(
                  //     list: controller
                  //         .state.registerBusinessCertificateReverseUrl,
                  //     rowCount: 2,
                  //     max: 1,
                  //     onChange: (type, value, index) {
                  //       if (type == 'add') {
                  //         print("添加返回");
                  //         controller.state.registerBusinessCertificateReverseUrl
                  //             .add(value);
                  //       }
                  //       if (type == 'del') {
                  //         controller.state.registerBusinessCertificateReverseUrl
                  //             .removeAt(index);
                  //       }
                  //       if (type == 'change') {
                  //         controller
                  //                 .state.registerBusinessCertificateReverseUrl[
                  //             index] = value;
                  //       }
                  //     }),
                  //统一信用代码
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        // FilteringTextInputFormatter.digitsOnly,
                        // LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '统一信用代码（以营业执照默认）',
                      controller:
                          controller.registerCertificateCodeInputController,
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerCertificateCode.value =
                            value.toString()
                      },
                    ),
                  ),
                  // 供应商名称
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        // FilteringTextInputFormatter.digitsOnly,
                        // LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '供应商名称',
                      controller: controller.registerStoreNameInputController,
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerSupplierName.value =
                            value.toString()
                      },
                    ),
                  ),
                  // 供应商地址
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        // FilteringTextInputFormatter.digitsOnly,
                        // LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '供应商地址',
                      controller: controller.registerAddressInputController,
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerAddress.value =
                            value.toString()
                      },
                    ),
                  ),

                  // 身份证
                  Container(
                    width: double.infinity,
                    height: 40,
                    alignment: Alignment.centerLeft,
                    padding: EdgeInsets.only(left: 20),
                    child: Text("身份证（正反面）"),
                  ),
                  buildUpload(
                      list: controller.state.registerIdNumberImages,
                      rowCount: 2,
                      max: 2,
                      imageType: "IdCard",
                      onOcrContent: (orcData) {
                        controller.handleOrcData(
                            imageType: "IdCard", orcData: orcData);
                      },
                      onChange: (type, value, index) {
                        if (type == 'add') {
                          print("添加返回");
                          controller.state.registerIdNumberImages.add(value);
                        }
                        if (type == 'del') {
                          controller.state.registerIdNumberImages
                              .removeAt(index);
                        }
                        if (type == 'change') {
                          controller.state.registerIdNumberImages[index] =
                              value;
                        }
                      }),
                  // 法人名称
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        // FilteringTextInputFormatter.digitsOnly,
                        // LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '法人名称',
                      controller: controller.registerUserNameInputController,
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerUserName.value =
                            value.toString()
                      },
                    ),
                  ),
                  // 身份证
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        // FilteringTextInputFormatter.digitsOnly,
                        // LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '法人身份证号码（以身份证默认）',
                      controller: controller.registerIdNumberInputController,
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerIdNumber.value =
                            value.toString()
                      },
                    ),
                  ),

                  // // 证件照片
                  // Container(
                  //   width: double.infinity,
                  //   height: 40,
                  //   alignment: Alignment.centerLeft,
                  //   padding: EdgeInsets.only(left: 20),
                  //   child: Text("证件照片"),
                  // ),
                  // buildUpload(
                  //     list: controller.state.registerIdCardImage,
                  //     rowCount: 2,
                  //     max: 2,
                  //     onChange: (type, value, index) {
                  //       if (type == 'add') {
                  //         print("添加返回");
                  //         controller.state.registerIdCardImage.add(value);
                  //       }
                  //       if (type == 'del') {
                  //         controller.state.registerIdCardImage.removeAt(index);
                  //       }
                  //       if (type == 'change') {
                  //         controller.state.registerIdCardImage[index] = value;
                  //       }
                  //     }),

                  // 品牌证书/代理证明
                  Container(
                    width: double.infinity,
                    height: 40,
                    alignment: Alignment.centerLeft,
                    padding: EdgeInsets.only(left: 20),
                    child: Text("品牌证书/代理证明"),
                  ),
                  buildUpload(
                      list: controller.state.registerCertImages,
                      rowCount: 2,
                      max: 2,
                      onChange: (type, value, index) {
                        if (type == 'add') {
                          print("添加返回");
                          controller.state.registerCertImages.add(value);
                        }
                        if (type == 'del') {
                          controller.state.registerCertImages.removeAt(index);
                        }
                        if (type == 'change') {
                          controller.state.registerCertImages[index] = value;
                        }
                      }),
                  // 手机号
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        FilteringTextInputFormatter.digitsOnly,
                        LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '手机号',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerPhone.value = value.toString()
                      },
                    ),
                  ),

                  // 验证码
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: Stack(
                      alignment: Alignment.topRight,
                      children: [
                        CupertinoTextFormFieldRow(
                          style: TextStyle(fontSize: 15),
                          // controller: codeInputController,
                          // focusNode: controller.codeFocusNode,
                          inputFormatters: [
                            FilteringTextInputFormatter.digitsOnly,
                            LengthLimitingTextInputFormatter(6), //限制长度
                          ],
                          // prefix: const Center(child: Icon(Icons.message)),
                          placeholder: '验证码',
                          placeholderStyle: TextStyle(
                              color: CupertinoColors.darkBackgroundGray
                                  .withOpacity(.7)),
                          keyboardType: TextInputType.emailAddress,
                          keyboardAppearance: Brightness.dark,
                          onChanged: (value) => {
                            controller.state.registerCode.value =
                                value.toString()
                          },
                        ),
                        Container(
                          padding: const EdgeInsets.only(right: 30),
                          child: OutlinedButton(
                              onPressed: () => {
                                    controller.getRegisterCode(
                                        sendRegisterCodeAPI:
                                            widget.sendRegisterCodeAPI)
                                  },
                              style: ButtonStyle(
                                side: MaterialStateProperty.all(
                                    const BorderSide(
                                        width: 0.0, color: Colors.transparent)),
                                shape: MaterialStateProperty.all(
                                    RoundedRectangleBorder(
                                        borderRadius:
                                            BorderRadius.circular(20))),
                                textStyle: MaterialStateProperty.all(
                                    const TextStyle(fontSize: 16)),
                              ),
                              child: Obx(() => Text(
                                    controller.state.registerWaitTitle.value,
                                    style: const TextStyle(
                                      color: Color(0xffE69C24),
                                    ),
                                  ))),
                        )
                      ],
                    ),
                  ),
                  // 密码
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      // controller: passwordInputController,
                      // focusNode: controller.passwordFocusNode,
                      obscureText: true,
                      // prefix: const Center(child: Icon(Icons.message)),
                      placeholder: '*密码',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerPassword.value =
                            value.toString()
                      },
                    ),
                  ),
                  // 确认密码
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      // controller: passwordInputController,
                      // focusNode: controller.passwordFocusNode,
                      obscureText: true,
                      // prefix: const Center(child: Icon(Icons.message)),
                      placeholder: '*确认密码',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerAgainPassword.value =
                            value.toString()
                      },
                    ),
                  ),
                  // 邀请码
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        FilteringTextInputFormatter.digitsOnly,
                        LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '邀请码（选填）',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerInviteCode.value =
                            value.toString()
                      },
                    ),
                  ),
                  Padding(
                      padding: EdgeInsets.only(top: 15, bottom: 10),
                      child: buildButton(
                          title: "注册",
                          height: 50,
                          onClick: () {
                            controller.handleRegister(
                                appType: widget.appType,
                                loginAPI: widget.loginAPI,
                                loginSuccess: widget.loginSuccess,
                                registerAPI: widget.registerAPI);
                          },
                          colors: [Color(0xff0000FF), Color(0xff0000FF)])),
                  Container(
                    width: double.infinity,
                    height: 30,
                    margin: EdgeInsets.only(top: 30),
                    // color: Colors.red,
                    child: Row(
                      children: [],
                    ),
                  ),
                ])))));
  }

  Widget workerRegisterPanel() {
    return Expanded(
        child: Padding(
            padding: const EdgeInsets.only(left: 20, right: 20),
            child: Container(
                width: double.infinity,
                height: double.infinity,
                // color: Colors.green,
                child: SingleChildScrollView(
                    child: Column(children: [
                  // 身份证
                  Container(
                    width: double.infinity,
                    height: 40,
                    alignment: Alignment.centerLeft,
                    padding: EdgeInsets.only(left: 20),
                    child: Text("身份证（正反面）"),
                  ),
                  buildUpload(
                      list: controller.state.registerIdNumberImages,
                      rowCount: 2,
                      max: 2,
                      imageType: "IdCard",
                      onOcrContent: (orcData) {
                        controller.handleOrcData(
                            imageType: "IdCard", orcData: orcData);
                      },
                      onChange: (type, value, index) {
                        if (type == 'add') {
                          print("添加返回");
                          controller.state.registerIdNumberImages.add(value);
                        }
                        if (type == 'del') {
                          controller.state.registerIdNumberImages
                              .removeAt(index);
                        }
                        if (type == 'change') {
                          controller.state.registerIdNumberImages[index] =
                              value;
                        }
                      }),

                  Container(
                    width: double.infinity,
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          height: 40,
                          width: 100,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 20),
                          child: const Text("姓名"),
                        ),
                        Expanded(
                          child: Container(
                            width: double.infinity,
                            height: 50,
                            // margin: const EdgeInsets.only(top: 5, bottom: 5),
                            decoration: const BoxDecoration(
                              color: Color(0xffF9FAFE),
                              borderRadius:
                                  BorderRadius.all(Radius.circular(40.0)), //圆角
                            ),
                            child: CupertinoTextFormFieldRow(
                              style: TextStyle(fontSize: 15),
                              inputFormatters: [
                                // FilteringTextInputFormatter.digitsOnly,
                                // LengthLimitingTextInputFormatter(11), //限制长度
                              ],
                              controller:
                                  controller.registerUserNameInputController,
                              placeholder: '身份证名称（以身份证默认）',
                              placeholderStyle: TextStyle(
                                  color: CupertinoColors.darkBackgroundGray
                                      .withOpacity(.7)),
                              keyboardType: TextInputType.emailAddress,
                              keyboardAppearance: Brightness.dark,
                              onChanged: (value) => {
                                controller.state.registerUserName.value =
                                    value.toString()
                              },
                            ),
                          ),
                        )
                      ],
                    ),
                  ),

                  // 身份证姓名

                  Container(
                    width: double.infinity,
                    height: 50,
                    child: Row(
                      children: [
                        Container(
                          width: 100,
                          // color: Colors.red,
                          // width: double.infinity,
                          height: 40,
                          alignment: Alignment.centerLeft,
                          padding: const EdgeInsets.only(left: 20),
                          child: const Text("身份证号码"),
                        ),
                        Expanded(
                            child: Container(
                          width: double.infinity,
                          height: 50,
                          // margin: const EdgeInsets.only(top: 15, bottom: 5),
                          decoration: const BoxDecoration(
                            color: Color(0xffF9FAFE),
                            borderRadius:
                                BorderRadius.all(Radius.circular(40.0)), //圆角
                          ),
                          child: CupertinoTextFormFieldRow(
                            style: TextStyle(fontSize: 15),
                            inputFormatters: [
                              // FilteringTextInputFormatter.digitsOnly,
                              // LengthLimitingTextInputFormatter(11), //限制长度
                            ],
                            placeholder: '身份证号码（以身份证默认）',
                            controller:
                                controller.registerIdNumberInputController,
                            placeholderStyle: TextStyle(
                                color: CupertinoColors.darkBackgroundGray
                                    .withOpacity(.7)),
                            keyboardType: TextInputType.emailAddress,
                            keyboardAppearance: Brightness.dark,
                            onChanged: (value) => {
                              controller.state.registerIdNumber.value =
                                  value.toString()
                            },
                          ),
                        ))

                        // 身份证
                        ,
                      ],
                    ),
                  ),

                  // 行驶证/行驶证/流动服务车照片
                  Container(
                    width: double.infinity,
                    height: 40,
                    alignment: Alignment.centerLeft,
                    padding: EdgeInsets.only(left: 20),
                    child: Text("行驶证/流动服务车照片"),
                  ),
                  buildUpload(
                      list: controller.state.registerDriveImages,
                      rowCount: 3,
                      max: 3,
                      imageType: "VehicleLicense",
                      onOcrContent: (orcData) {
                        print("识别行驶证======》");
                        print(orcData);

                        controller.handleOrcData(
                            imageType: "VehicleLicense", orcData: orcData);
                      },
                      onChange: (type, value, index) {
                        if (type == 'add') {
                          print("添加返回");
                          controller.state.registerDriveImages.add(value);
                        }
                        if (type == 'del') {
                          controller.state.registerDriveImages.removeAt(index);
                        }
                        if (type == 'change') {
                          controller.state.registerDriveImages[index] = value;
                        }
                      }),
                  // 车牌
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        // FilteringTextInputFormatter.digitsOnly,
                        // LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '服务车牌',
                      controller: controller.registerCarNumberInputController,
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerCarNumber.value =
                            value.toString()
                      },
                    ),
                  ),

                  Container(
                    width: double.infinity,
                    height: 40,
                    alignment: Alignment.centerLeft,
                    padding: EdgeInsets.only(left: 20),
                    child: Text("驾驶证"),
                  ),
                  buildUpload(
                      list: controller.state.registerCarCertImages,
                      rowCount: 3,
                      max: 3,
                      imageType: "DrivingLicense",
                      onOcrContent: (orcData) {
                        print("识别驾驶证======》");
                        print(orcData);

                        controller.handleOrcData(
                            imageType: "DrivingLicense", orcData: orcData);
                      },
                      onChange: (type, value, index) {
                        if (type == 'add') {
                          print("添加返回");
                          controller.state.registerCarCertImages.add(value);
                        }
                        if (type == 'del') {
                          controller.state.registerCarCertImages
                              .removeAt(index);
                        }
                        if (type == 'change') {
                          controller.state.registerCarCertImages[index] = value;
                        }
                      }),

                  // 驾驶证姓名
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        // FilteringTextInputFormatter.digitsOnly,
                        // LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '驾驶证姓名',
                      controller: controller.registerDriverNameInputController,
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerDriverName.value =
                            value.toString()
                      },
                    ),
                  ),
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        FilteringTextInputFormatter.digitsOnly,
                        LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '手机号',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerPhone.value = value.toString()
                      },
                    ),
                  ),
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: Stack(
                      alignment: Alignment.topRight,
                      children: [
                        CupertinoTextFormFieldRow(
                          style: TextStyle(fontSize: 15),
                          // controller: codeInputController,
                          // focusNode: controller.codeFocusNode,
                          inputFormatters: [
                            FilteringTextInputFormatter.digitsOnly,
                            LengthLimitingTextInputFormatter(6), //限制长度
                          ],
                          // prefix: const Center(child: Icon(Icons.message)),
                          placeholder: '验证码',
                          placeholderStyle: TextStyle(
                              color: CupertinoColors.darkBackgroundGray
                                  .withOpacity(.7)),
                          keyboardType: TextInputType.emailAddress,
                          keyboardAppearance: Brightness.dark,
                          onChanged: (value) => {
                            controller.state.registerCode.value =
                                value.toString()
                          },
                        ),
                        Container(
                          padding: const EdgeInsets.only(right: 30),
                          child: OutlinedButton(
                              onPressed: () => {
                                    controller.getRegisterCode(
                                        sendRegisterCodeAPI:
                                            widget.sendRegisterCodeAPI)
                                  },
                              style: ButtonStyle(
                                side: MaterialStateProperty.all(
                                    const BorderSide(
                                        width: 0.0, color: Colors.transparent)),
                                shape: MaterialStateProperty.all(
                                    RoundedRectangleBorder(
                                        borderRadius:
                                            BorderRadius.circular(20))),
                                textStyle: MaterialStateProperty.all(
                                    const TextStyle(fontSize: 16)),
                              ),
                              child: Obx(() => Text(
                                    controller.state.registerWaitTitle.value,
                                    style: const TextStyle(
                                      color: Color(0xffE69C24),
                                    ),
                                  ))),
                        )
                      ],
                    ),
                  ),
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      // controller: passwordInputController,
                      // focusNode: controller.passwordFocusNode,
                      obscureText: true,
                      // prefix: const Center(child: Icon(Icons.message)),
                      placeholder: '*密码',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerPassword.value =
                            value.toString()
                      },
                    ),
                  ),
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      // controller: passwordInputController,
                      // focusNode: controller.passwordFocusNode,
                      obscureText: true,
                      // prefix: const Center(child: Icon(Icons.message)),
                      placeholder: '*确认密码',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerAgainPassword.value =
                            value.toString()
                      },
                    ),
                  ),
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        FilteringTextInputFormatter.digitsOnly,
                        LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '邀请码（选填）',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerInviteCode.value =
                            value.toString()
                      },
                    ),
                  ),
                  Padding(
                      padding: EdgeInsets.only(top: 15, bottom: 10),
                      child: buildButton(
                          title: "注册",
                          height: 50,
                          onClick: () {
                            controller.handleRegister(
                                appType: widget.appType,
                                loginAPI: widget.loginAPI,
                                loginSuccess: widget.loginSuccess,
                                registerAPI: widget.registerAPI);
                          },
                          colors: [Color(0xff0000FF), Color(0xff0000FF)])),
                  Container(
                    width: double.infinity,
                    height: 30,
                    margin: EdgeInsets.only(top: 30),
                    // color: Colors.red,
                    child: Row(
                      children: [
                        // Expanded(
                        //     child: Container(
                        //         width: double.infinity,
                        //         height: double.infinity,
                        //         // color: Colors.yellow,
                        //         child: Column(
                        //           mainAxisAlignment: MainAxisAlignment.center,
                        //           children: [
                        //             Container(
                        //               width: double.infinity,
                        //               height: 1,
                        //               color: Color.fromARGB(60, 153, 153, 153),
                        //             ),
                        //           ],
                        //         ))),
                        // Padding(
                        //   padding: EdgeInsets.only(left: 20, right: 20),
                        //   child: Text(
                        //     "or",
                        //     style: TextStyle(color: Color(0xff999999)),
                        //   ),
                        // ),
                        // Expanded(
                        //     child: Container(
                        //   width: double.infinity,
                        //   height: double.infinity,
                        //   // color: Colors.yellow,
                        //   child: Column(
                        //     mainAxisAlignment: MainAxisAlignment.center,
                        //     children: [
                        //       Container(
                        //         width: double.infinity,
                        //         height: 1,
                        //         color: Color.fromARGB(60, 153, 153, 153),
                        //       ),
                        //     ],
                        //   ),
                        // ))
                      ],
                    ),
                  ),
                  // Padding(
                  //     padding: EdgeInsets.only(top: 20, bottom: 20),
                  //     child: Container(
                  //       width: double.infinity,
                  //       height: 40,
                  //       // color: Colors.red,
                  //       child: Row(
                  //         children: [
                  //           Expanded(
                  //               child: Container(
                  //             width: double.infinity,
                  //             height: double.infinity,
                  //             // color: Colors.yellow,
                  //             padding: EdgeInsets.only(right: 30),
                  //             alignment: Alignment.centerRight,
                  //             child: buildImage(
                  //                 url: "assets/images/login/weixin.png"),
                  //           )),
                  //           Expanded(
                  //               child: Container(
                  //             width: double.infinity,
                  //             height: double.infinity,
                  //             // color: Colors.green,
                  //             alignment: Alignment.centerLeft,
                  //             padding: EdgeInsets.only(left: 30),
                  //             child:
                  //                 buildImage(url: "assets/images/login/qq.png"),
                  //           ))
                  //         ],
                  //       ),
                  //     )),
                  // buildRadio()
                ])))));
  }

  Widget userRegisterPanel() {
    return Expanded(
        child: Padding(
            padding: const EdgeInsets.only(left: 20, right: 20),
            child: SizedBox(
                width: double.infinity,
                height: double.infinity,
                child: SingleChildScrollView(
                    child: Column(children: [
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: const TextStyle(fontSize: 15),
                      inputFormatters: [
                        FilteringTextInputFormatter.digitsOnly,
                        LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '手机号',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerPhone.value = value.toString()
                      },
                    ),
                  ),
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: Stack(
                      alignment: Alignment.topRight,
                      children: [
                        CupertinoTextFormFieldRow(
                          style: const TextStyle(fontSize: 15),
                          inputFormatters: [
                            FilteringTextInputFormatter.digitsOnly,
                            LengthLimitingTextInputFormatter(6), //限制长度
                          ],
                          placeholder: '验证码',
                          placeholderStyle: TextStyle(
                              color: CupertinoColors.darkBackgroundGray
                                  .withOpacity(.7)),
                          keyboardType: TextInputType.emailAddress,
                          keyboardAppearance: Brightness.dark,
                          onChanged: (value) => {
                            controller.state.registerCode.value =
                                value.toString()
                          },
                        ),
                        Container(
                          padding: const EdgeInsets.only(right: 30),
                          child: OutlinedButton(
                              onPressed: () => {
                                    controller.getRegisterCode(
                                        sendRegisterCodeAPI:
                                            widget.sendRegisterCodeAPI)
                                  },
                              style: ButtonStyle(
                                side: MaterialStateProperty.all(
                                    const BorderSide(
                                        width: 0.0, color: Colors.transparent)),
                                shape: MaterialStateProperty.all(
                                    RoundedRectangleBorder(
                                        borderRadius:
                                            BorderRadius.circular(20))),
                                textStyle: MaterialStateProperty.all(
                                    const TextStyle(fontSize: 16)),
                              ),
                              child: Obx(() => Text(
                                    controller.state.registerWaitTitle.value,
                                    style: TextStyle(
                                      color: Color(0xff0000f5),
                                    ),
                                  ))),
                        )
                      ],
                    ),
                  ),
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: const TextStyle(fontSize: 15),
                      obscureText: true,
                      placeholder: '*密码',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerPassword.value =
                            value.toString()
                      },
                    ),
                  ),
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: const TextStyle(fontSize: 15),
                      obscureText: true,
                      placeholder: '*确认密码',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerAgainPassword.value =
                            value.toString()
                      },
                    ),
                  ),
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: const TextStyle(fontSize: 15),
                      inputFormatters: [
                        FilteringTextInputFormatter.digitsOnly,
                        LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '邀请码（选填）',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerInviteCode.value =
                            value.toString()
                      },
                    ),
                  ),
                  Padding(
                      padding: const EdgeInsets.only(top: 15, bottom: 10),
                      child: buildButton(
                          title: "注册",
                          height: 50,
                          onClick: () {
                            controller.handleRegister(
                                appType: widget.appType,
                                loginAPI: widget.loginAPI,
                                loginSuccess: widget.loginSuccess,
                                registerAPI: widget.registerAPI);
                          },
                          colors: [
                            const Color(0xff0000FF),
                            const Color(0xff0000FF)
                          ])),
                  Container(
                    width: double.infinity,
                    height: 30,
                    margin: const EdgeInsets.only(top: 30),
                  ),
                ])))));
  }

  Widget businessRegisterPanel() {
    return Expanded(
        child: Padding(
            padding: const EdgeInsets.only(left: 20, right: 20),
            child: Container(
                width: double.infinity,
                height: double.infinity,
                // color: Colors.green,
                child: SingleChildScrollView(
                    child: Column(children: [
                  //营业执照照片/开户许可证/一般纳税人
                  Container(
                    width: double.infinity,
                    height: 40,
                    alignment: Alignment.centerLeft,
                    padding: const EdgeInsets.only(left: 20),
                    child: const Text("营业执照照片/开户许可证/一般纳税人"),
                  ),
                  buildUpload(
                      list: controller.state.registerBusinessImages,
                      rowCount: 3,
                      max: 3,
                      imageType: "BusinessLicense",
                      onOcrContent: (orcData) {
                        controller.handleOrcData(
                            imageType: "BusinessLicense", orcData: orcData);
                      },
                      onChange: (type, value, index) {
                        if (type == 'add') {
                          print("添加返回");
                          print(value);
                          controller.state.registerBusinessImages.add(value);
                        }
                        if (type == 'del') {
                          controller.state.registerBusinessImages
                              .removeAt(index);
                        }
                        if (type == 'change') {
                          controller.state.registerBusinessImages[index] =
                              value;
                        }
                      }),
                  // 营业执照-正面
                  // Container(
                  //   width: double.infinity,
                  //   height: 40,
                  //   alignment: Alignment.centerLeft,
                  //   padding: EdgeInsets.only(left: 20),
                  //   child: Text("营业执照正面"),
                  // ),
                  // buildUpload(
                  //     list:
                  //         controller.state.registerBusinessCertificateFrontUrl,
                  //     rowCount: 2,
                  //     max: 1,
                  //     onChange: (type, value, index) {
                  //       if (type == 'add') {
                  //         print("添加返回");
                  //         controller.state.registerBusinessCertificateFrontUrl
                  //             .add(value);
                  //       }
                  //       if (type == 'del') {
                  //         controller.state.registerBusinessCertificateFrontUrl
                  //             .removeAt(index);
                  //       }
                  //       if (type == 'change') {
                  //         controller.state
                  //                 .registerBusinessCertificateFrontUrl[index] =
                  //             value;
                  //       }
                  //     }),
                  //营业执照反面
                  // Container(
                  //   width: double.infinity,
                  //   height: 40,
                  //   alignment: Alignment.centerLeft,
                  //   padding: EdgeInsets.only(left: 20),
                  //   child: Text("营业执照反面"),
                  // ),
                  // buildUpload(
                  //     list: controller
                  //         .state.registerBusinessCertificateReverseUrl,
                  //     rowCount: 2,
                  //     max: 1,
                  //     onChange: (type, value, index) {
                  //       if (type == 'add') {
                  //         print("添加返回");
                  //         controller.state.registerBusinessCertificateReverseUrl
                  //             .add(value);
                  //       }
                  //       if (type == 'del') {
                  //         controller.state.registerBusinessCertificateReverseUrl
                  //             .removeAt(index);
                  //       }
                  //       if (type == 'change') {
                  //         controller
                  //                 .state.registerBusinessCertificateReverseUrl[
                  //             index] = value;
                  //       }
                  //     }),
                  //统一信用代码
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        // FilteringTextInputFormatter.digitsOnly,
                        // LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      controller:
                          controller.registerCertificateCodeInputController,
                      placeholder: '统一信用代码（以营业执照默认）',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerCertificateCode.value =
                            value.toString()
                      },
                    ),
                  ),
                  // 店铺名称
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        // FilteringTextInputFormatter.digitsOnly,
                        // LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '公司/店面名称（以营业执照默认）',
                      controller: controller.registerStoreNameInputController,
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerStoreName.value =
                            value.toString()
                      },
                    ),
                  ),
                  // 店铺地址
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        // FilteringTextInputFormatter.digitsOnly,
                        // LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '公司/店面地址（以营业执照默认）',
                      controller: controller.registerAddressInputController,
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerAddress.value =
                            value.toString()
                      },
                    ),
                  ),

                  // 身份证
                  Container(
                    width: double.infinity,
                    height: 40,
                    alignment: Alignment.centerLeft,
                    padding: EdgeInsets.only(left: 20),
                    child: Text("身份证（正反面）"),
                  ),
                  buildUpload(
                      list: controller.state.registerIdNumberImages,
                      rowCount: 2,
                      max: 2,
                      imageType: "IdCard",
                      onOcrContent: (orcData) {
                        controller.handleOrcData(
                            imageType: "IdCard", orcData: orcData);
                      },
                      onChange: (type, value, index) {
                        if (type == 'add') {
                          print("添加返回");
                          controller.state.registerIdNumberImages.add(value);
                        }
                        if (type == 'del') {
                          controller.state.registerIdNumberImages
                              .removeAt(index);
                        }
                        if (type == 'change') {
                          controller.state.registerIdNumberImages[index] =
                              value;
                        }
                      }),

                  // 法人名称
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        // FilteringTextInputFormatter.digitsOnly,
                        // LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '法人身份证名称（以身份证默认）',
                      controller: controller.registerUserNameInputController,
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerUserName.value =
                            value.toString()
                      },
                    ),
                  ),
                  // 身份证
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        // FilteringTextInputFormatter.digitsOnly,
                        // LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '法人身份证号码（以身份证默认）',
                      controller: controller.registerIdNumberInputController,
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerIdNumber.value =
                            value.toString()
                      },
                    ),
                  ),

                  // 公司/店面门头照片
                  Container(
                    width: double.infinity,
                    height: 40,
                    alignment: Alignment.centerLeft,
                    padding: EdgeInsets.only(left: 20),
                    child: Text("公司/店面门头照片"),
                  ),
                  buildUpload(
                      list: controller.state.registerStoreImageUrl,
                      rowCount: 2,
                      max: 2,
                      onChange: (type, value, index) {
                        if (type == 'add') {
                          print("添加返回");
                          controller.state.registerStoreImageUrl.add(value);
                        }
                        if (type == 'del') {
                          controller.state.registerStoreImageUrl
                              .removeAt(index);
                        }
                        if (type == 'change') {
                          controller.state.registerStoreImageUrl[index] = value;
                        }
                      }),

                  // 手机号
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        FilteringTextInputFormatter.digitsOnly,
                        LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '手机号',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerPhone.value = value.toString()
                      },
                    ),
                  ),
                  //验证码
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: Stack(
                      alignment: Alignment.topRight,
                      children: [
                        CupertinoTextFormFieldRow(
                          style: TextStyle(fontSize: 15),
                          // controller: codeInputController,
                          // focusNode: controller.codeFocusNode,
                          inputFormatters: [
                            FilteringTextInputFormatter.digitsOnly,
                            LengthLimitingTextInputFormatter(6), //限制长度
                          ],
                          // prefix: const Center(child: Icon(Icons.message)),
                          placeholder: '验证码',
                          placeholderStyle: TextStyle(
                              color: CupertinoColors.darkBackgroundGray
                                  .withOpacity(.7)),
                          keyboardType: TextInputType.emailAddress,
                          keyboardAppearance: Brightness.dark,
                          onChanged: (value) => {
                            controller.state.registerCode.value =
                                value.toString()
                          },
                        ),
                        Container(
                          padding: const EdgeInsets.only(right: 30),
                          child: OutlinedButton(
                              onPressed: () => {
                                    controller.getRegisterCode(
                                        sendRegisterCodeAPI:
                                            widget.sendRegisterCodeAPI)
                                  },
                              style: ButtonStyle(
                                side: MaterialStateProperty.all(
                                    const BorderSide(
                                        width: 0.0, color: Colors.transparent)),
                                shape: MaterialStateProperty.all(
                                    RoundedRectangleBorder(
                                        borderRadius:
                                            BorderRadius.circular(20))),
                                textStyle: MaterialStateProperty.all(
                                    const TextStyle(fontSize: 16)),
                              ),
                              child: Obx(() => Text(
                                    controller.state.registerWaitTitle.value,
                                    style: const TextStyle(
                                      color: Color(0xffE69C24),
                                    ),
                                  ))),
                        )
                      ],
                    ),
                  ),
                  // 密码
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      // controller: passwordInputController,
                      // focusNode: controller.passwordFocusNode,
                      obscureText: true,
                      // prefix: const Center(child: Icon(Icons.message)),
                      placeholder: '*密码',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerPassword.value =
                            value.toString()
                      },
                    ),
                  ),
                  // 密码确认
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      // controller: passwordInputController,
                      // focusNode: controller.passwordFocusNode,
                      obscureText: true,
                      // prefix: const Center(child: Icon(Icons.message)),
                      placeholder: '*确认密码',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerAgainPassword.value =
                            value.toString()
                      },
                    ),
                  ),
                  // 邀请码
                  Container(
                    width: double.infinity,
                    height: 50,
                    margin: const EdgeInsets.only(top: 15, bottom: 5),
                    decoration: const BoxDecoration(
                      color: Color(0xffF9FAFE),
                      borderRadius:
                          BorderRadius.all(Radius.circular(40.0)), //圆角
                    ),
                    child: CupertinoTextFormFieldRow(
                      style: TextStyle(fontSize: 15),
                      inputFormatters: [
                        FilteringTextInputFormatter.digitsOnly,
                        LengthLimitingTextInputFormatter(11), //限制长度
                      ],
                      placeholder: '邀请码（选填）',
                      placeholderStyle: TextStyle(
                          color: CupertinoColors.darkBackgroundGray
                              .withOpacity(.7)),
                      keyboardType: TextInputType.emailAddress,
                      keyboardAppearance: Brightness.dark,
                      onChanged: (value) => {
                        controller.state.registerInviteCode.value =
                            value.toString()
                      },
                    ),
                  ),

                  Padding(
                      padding: EdgeInsets.only(top: 15, bottom: 10),
                      child: buildButton(
                          title: "注册",
                          height: 50,
                          onClick: () {
                            controller.handleRegister(
                                appType: widget.appType,
                                loginAPI: widget.loginAPI,
                                loginSuccess: widget.loginSuccess,
                                registerAPI: widget.registerAPI);
                          },
                          colors: [Color(0xff0000FF), Color(0xff0000FF)])),
                  Container(
                    width: double.infinity,
                    height: 30,
                    margin: EdgeInsets.only(top: 30),
                    // color: Colors.red,
                    child: Row(
                      children: [
                        // Expanded(
                        //     child: Container(
                        //         width: double.infinity,
                        //         height: double.infinity,
                        //         // color: Colors.yellow,
                        //         child: Column(
                        //           mainAxisAlignment: MainAxisAlignment.center,
                        //           children: [
                        //             Container(
                        //               width: double.infinity,
                        //               height: 1,
                        //               color: Color.fromARGB(60, 153, 153, 153),
                        //             ),
                        //           ],
                        //         ))),
                        // Padding(
                        //   padding: EdgeInsets.only(left: 20, right: 20),
                        //   child: Text(
                        //     "or",
                        //     style: TextStyle(color: Color(0xff999999)),
                        //   ),
                        // ),
                        // Expanded(
                        //     child: Container(
                        //   width: double.infinity,
                        //   height: double.infinity,
                        //   // color: Colors.yellow,
                        //   child: Column(
                        //     mainAxisAlignment: MainAxisAlignment.center,
                        //     children: [
                        //       Container(
                        //         width: double.infinity,
                        //         height: 1,
                        //         color: Color.fromARGB(60, 153, 153, 153),
                        //       ),
                        //     ],
                        //   ),
                        // ))
                      ],
                    ),
                  ),
                  // Padding(
                  //     padding: EdgeInsets.only(top: 20, bottom: 20),
                  //     child: Container(
                  //       width: double.infinity,
                  //       height: 40,
                  //       // color: Colors.red,
                  //       child: Row(
                  //         children: [
                  //           Expanded(
                  //               child: Container(
                  //             width: double.infinity,
                  //             height: double.infinity,
                  //             // color: Colors.yellow,
                  //             padding: EdgeInsets.only(right: 30),
                  //             alignment: Alignment.centerRight,
                  //             child: buildImage(
                  //                 url: "assets/images/login/weixin.png"),
                  //           )),
                  //           Expanded(
                  //               child: Container(
                  //             width: double.infinity,
                  //             height: double.infinity,
                  //             // color: Colors.green,
                  //             alignment: Alignment.centerLeft,
                  //             padding: EdgeInsets.only(left: 30),
                  //             child:
                  //                 buildImage(url: "assets/images/login/qq.png"),
                  //           ))
                  //         ],
                  //       ),
                  //     )),
                  // buildRadio()
                ])))));
  }

  @override
  Widget build(BuildContext context) {
    var screenBottomHeight = MediaQuery.of(context).padding.bottom;
    return Obx(() => Container(
          width: double.infinity,
          // height: double.infinity,
          // height: 50,
          // color: Colors.yellow,
          child: Column(
            children: [
              buildTopTab(),
              Expanded(
                  child: Container(
                width: double.infinity,
                height: double.infinity,
                // color: Colors.red,
                child: Column(
                  children: [
                    // 登录注册密码
                    Visibility(
                        visible: controller.state.activeTab.value == 0,
                        child: buildRegisterPanel()),
                    // 登录密码
                    Visibility(
                      visible: controller.state.activeTab.value == 1,
                      child: buildPasswordPanel(),
                    ),
                    // // 找回密码
                    Visibility(
                        visible: controller.state.activeTab.value == 2,
                        child: buildFindPasswordPanel())
                  ],
                ),
              )),
              SizedBox(
                width: double.infinity,
                height: screenBottomHeight,
                // color: Colors.yellow,
              )
            ],
          ),
        ));
  }
}
